!function(){function e(){var e=UserWayWidgetApp.ContextHolder.config,t=e._userway_config.hasOwnProperty("ai_custom_focus_style_enabled");return t?t&&(!0===e._userway_config.ai_custom_focus_style_enabled||"true"===e._userway_config.ai_custom_focus_style_enabled):c.enabled}function t(e){var t={outline:c.outlineWidth+" "+c.outlineStyle+" "+c.outlineColor};return t["outline-offset"]="-"+c.outlineWidth,t}function n(e){if("function"==typeof e.hasAttribute&&e.hasAttribute(m)){var n=window.getComputedStyle(e),r=t(n);f.resetInlineStyles(e,m,r),e.removeAttribute(m)}}function r(e){e.target&&h&&s.addStyles(e.target)}function o(e){var t=e?"addEventListener":"removeEventListener";document[t]("mousedown",i),document[t]("keydown",a),document[t]("focusin",r),document[t]("focusout",g)}function i(){h=!1}function a(){h=!0}var l,u,d;if(!(null===(d=null===(u=null===(l=UserWayWidgetApp.ContextHolder)||void 0===l?void 0:l.config)||void 0===u?void 0:u.tunings)||void 0===d?void 0:d.new_focus_rule)){var s=UserWayWidgetApp.addLib("REMEDIATION_FOCUS_STYLE"),c=UserWayWidgetApp.getLib("remediationConfig").customFocus,f=UserWayWidgetApp.getLib("inlineStyling"),p=UserWayWidgetApp.getLib("remediation_utils"),m="data-uw-rm-outline",y={width:"2px",color:" #0018FF",style:"solid"},h=!1;s.apply=function(){var t,n,r,i;if(e()){var a=null===(r=null===(n=null===(t=UserWayWidgetApp.ContextHolder)||void 0===t?void 0:t.config)||void 0===n?void 0:n.tunings)||void 0===r?void 0:r.widget_color,l=null===(i=UserWayWidgetApp.getLib("remediationConfig").customFocus.config)||void 0===i?void 0:i.style,u="string"==typeof l?JSON.parse(l):l||y;c.outlineWidth=u.width,c.outlineColor=u.color||a,c.outlineStyle=u.style,setTimeout(function(){o(!0)},500)}},s.getFocusStyle=function(){return{enabled:e(),outlineWidth:c.outlineWidth||y.width,outlineColor:c.outlineColor||y.color,outlineStyle:c.outlineStyle||y.style}},s.updateOutlineStyle=function(e){if(e.data&&(e.data.update||null!=e.data.enabled)){var t=e.data.update,r=e.data.enabled;c.outlineWidth=t.width,c.outlineStyle=t.style,c.outlineColor=t.color,o(r),c.enabled!==r&&([].slice.call(document.querySelectorAll("["+m+"]")).forEach(function(e){n(e)}),c.enabled=r)}},s.addStyles=function(e){if(!e.hasAttribute(p.ignoreElementFromHelperProcessingAttr)){var n=window.getComputedStyle(e),r=t(n);f.applyInlineStyles(e,m,r),e.setAttribute(m,"")}};var g=function(e){e.target&&n(e.target)}}}();var __read=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function e(e){return e.filter(function(e){var t,n,r,i,m,y,h,g;if("function"==typeof e.hasAttribute&&e.hasAttribute(l)||a.isInertElement(e)||!o.isElementVisible(e,{shouldBeInViewport:!1})||a.isNativeTabbableElement(e)||a.isAriaHiddenElement(e)||a.hasTabbableDescendants(e))return!1;if(e.classList&&e.classList.contains("betterbot_botInfoText"))return e.setAttribute(l,u.BETTERBOT_CHAT),!0;if("function"==typeof e.getAttribute&&d.indexOf(e.getAttribute("role"))>-1&&!e.hasAttribute("tabindex"))return e.setAttribute(l,u.HAS_ROLE_NO_TABINDEX),!0;var v=!1,b=!1;if("function"==typeof e.hasAttribute)try{for(var _=__values(s),E=_.next();!E.done;E=_.next()){var w=E.value;if(e.hasAttribute(w)&&!o.isElementEditable(e)){b=!1,v=!0;try{for(var A=(r=void 0,__values(c)),S=A.next();!S.done;S=A.next()){var k=S.value;e.hasAttribute(k)&&(b=!0)}}catch(e){r={error:e}}finally{try{S&&!S.done&&(i=A.return)&&i.call(A)}finally{if(r)throw r.error}}}}}catch(e){t={error:e}}finally{try{E&&!E.done&&(n=_.return)&&n.call(_)}finally{if(t)throw t.error}}if(v&&!b)return e.setAttribute(l,u.HAS_ONCLICK_NO_ONKEYPRESS),!0;var x=!1,W=!1,O=!1,C=["drag-and-drop"];if("function"==typeof e.hasAttribute){O=e.hasAttribute("tabindex");try{for(var P=__values(f),N=P.next();!N.done;N=P.next()){var w=N.value;if(C.indexOf(e.nodeName.toLowerCase())<0&&e.hasAttribute(w)&&!o.isElementEditable(e)){W=!1,x=!0;try{for(var L=(h=void 0,__values(p)),H=L.next();!H.done;H=L.next()){var k=H.value;e.hasAttribute(k)&&(W=!0)}}catch(e){h={error:e}}finally{try{H&&!H.done&&(g=L.return)&&g.call(L)}finally{if(h)throw h.error}}}}}catch(e){m={error:e}}finally{try{N&&!N.done&&(y=P.return)&&y.call(P)}finally{if(m)throw m.error}}}return!x||W||O?!("A"!==e.tagName||e.href||e.hasAttribute("tabindex")||e.hasAttribute("role"))&&(e.setAttribute(l,u.ANCHOR_NO_HREF),!0):(e.setAttribute(l,u.HAS_NGCLICK_NO_NGKEYPRESS),!0)})}function t(e,t,n,i,a){try{e.onHelperRemediationStarted("REMEDIATION_KEYBOARD_NAVIGATION");var d=0;i.forEach(function(e){var t=e.getAttribute(l);if(t)return d++,t===u.BETTERBOT_CHAT?(e.setAttribute("tabindex","0"),e.setAttribute("role","button"),e.setAttribute("aria-label","Start chat with us"),void o.clickOnEnter(e)):t===u.HAS_ROLE_NO_TABINDEX?(e.setAttribute("tabindex","0"),void o.clickOnEnter(e)):t===u.OVERFLOW_HELPER?void e.setAttribute("tabindex","0"):t===u.HAS_ONCLICK_NO_ONKEYPRESS?void o.clickOnEnter(e):t&&e.getAttribute(l)===u.HAS_NGCLICK_NO_NGKEYPRESS?(e.setAttribute("role","button"),e.setAttribute("tabindex","0"),void o.clickOnEnter(e)):t===u.ANCHOR_NO_HREF?(e.setAttribute("tabindex","0"),void("pointer"===window.getComputedStyle(e).cursor&&o.clickOnEnter(e))):void 0}),e.onHelperRemediationCompleted(r.of("REMEDIATION_KEYBOARD_NAVIGATION",null,null,d,0)),t()}catch(e){n(e)}}var n=UserWayWidgetApp.addLib("REMEDIATION_KEYBOARD_NAVIGATION"),r=UserWayWidgetApp.getLib("remediation_helper_outcome"),o=UserWayWidgetApp.getLib("remediation_util"),i=UserWayWidgetApp.getLib("util"),a=UserWayWidgetApp.getLib("remediation_utils"),l="data-uw-rm-kbnav",u={BETTERBOT_CHAT:"betterbot",HAS_ROLE_NO_TABINDEX:"role",HAS_ONCLICK_NO_ONKEYPRESS:"click",HAS_NGCLICK_NO_NGKEYPRESS:"ngclick",OVERFLOW_HELPER:"scrollTabIndex",ANCHOR_NO_HREF:"anohref"},d=["link","button","menuitem","checkbox"],s=["onclick"],c=["onkeydown","onkeyup","onkeypress"],f=["ng-click"],p=["ng-keypress","ng-keyup","ng-keydown"];n.filter=function(t,n){return n.reset,e([].concat.apply([],__spreadArray([],__read(t.map(function(e){return[].slice.call(i.findAllElements(e))})),!1)))},n.awaitForResources=function(e,t){return Promise.resolve()},n.doRemediation=function(e,n,r){return new Promise(function(o,i){t(e,o,i,n,r)})}}();var __read=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},__values=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){var e=UserWayWidgetApp.addLib("remediation_util"),t=UserWayWidgetApp.getLib("util");e.focusableElementsSelector='\n a[href]:not([tabindex^="-"], [inert], [hidden]), \n area[href]:not([tabindex^="-"], [inert], [hidden]), \n audio[controls]:not([tabindex^="-"], [inert], [hidden]), \n button:not([disabled], [tabindex^="-"], [inert], [hidden]), \n details:not([inert], [hidden]) summary:not([tabindex^="-"], [inert], [hidden]), \n input:not([disabled], [type="hidden"], [tabindex^="-"], [hidden]), \n iframe:not([tabindex^="-"], [inert], [hidden]), \n select:not([disabled], [tabindex^="-"], [inert], [hidden]), \n textarea:not([disabled], [tabindex^="-"], [inert], [hidden]), \n video[controls]:not([tabindex^="-"], [inert], [hidden]), \n map[name] area[href]:not([tabindex^="-"]),\n [tabindex]:not([tabindex^="-"], [inert], [hidden]), \n [contenteditable]:not([contenteditable="false"], [tabindex^="-"], [inert], [hidden])\n ',e.keys={isRightShift:function(e){return 16===e.keyCode||"Shift"===e.key||"ShiftRight"===e.code},isLeftShift:function(e){return 16===e.keyCode||"Shift"===e.key||"ShiftLeft"===e.code},isSpace:function(e){return 32===e.keyCode||" "===e.key||"Space"===e.code},isEnter:function(e){return 13===e.keyCode||"Enter"===e.key||"Enter"===e.code},isEsc:function(e){return 27===e.keyCode||"Escape"===e.key||"Escape"===e.code},isTab:function(e){return 9===e.keyCode||"Tab"===e.key||"Tab"===e.code},isHome:function(e){return 36===e.keyCode||"Home"===e.key||"Home"===e.code},isEnd:function(e){return 35===e.keyCode||"End"===e.key||"End"===e.code},isPageUp:function(e){return 33===e.keyCode||"PageUp"===e.key||"PageUp"===e.code},isPageDown:function(e){return 34===e.keyCode||"PageDown"===e.key||"PageDown"===e.code},isArrowLeft:function(e){return 37===e.keyCode||"ArrowLeft"===e.key||"ArrowLeft"===e.code},isArrowUp:function(e){return 38===e.keyCode||"ArrowUp"===e.key||"ArrowUp"===e.code},isArrowRight:function(e){return 39===e.keyCode||"ArrowRight"===e.key||"ArrowRight"===e.code},isArrowDown:function(e){return 40===e.keyCode||"ArrowDown"===e.key||"ArrowDown"===e.code},isPrintableChar:function(e){return 1===e.key.length&&e.key.match(/\S/)}},e.log=function(e,t,n){console.warn("UserWay remediation "+e+" - "+t+": "+n)},e.generateRandomId=t.generateRandomId,e.isElementEditable=function(e){function t(e){var t=e.nodeName.toLowerCase();return!!e.hasAttribute("contenteditable")||1===e.nodeType&&("textarea"===t||"input"===t&&/^(?:text|email|number|search|tel|url|password)$/i.test(e.type))}var n,r,o=t(e);if(o)return!0;try{for(var i=__values(Array.from(e.querySelectorAll("*"))),a=i.next();!a.done;a=i.next()){if(o=t(a.value))break}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o},e.waitUntil=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),n=__assign({timeout:8e3,frequency:1e3},n||{});var o=Date.now();!function i(){var a=e();if(a)return t(a);setTimeout(function(){if(n.timeout&&Date.now()-o>n.timeout)return void(r&&r());i()},n.frequency)}()},e.trapFocusBetweenElements=function(t,n,r){void 0===r&&(r=null);var o=!1;window.addEventListener("keydown",function(t){e.keys.isLeftShift(t)&&(o=!0)}),window.addEventListener("keyup",function(t){e.keys.isLeftShift(t)&&(o=!1)}),t.setAttribute("tabindex","0"),document.activeElement&&r.contains(document.activeElement)||t.focus(),t.addEventListener("keydown",function(t){e.keys.isTab(t)&&o&&(t.preventDefault(),n.focus())}),n.setAttribute("tabindex","0"),n.addEventListener("keydown",function(n){e.keys.isTab(n)&&(o||(n.preventDefault(),t.focus()))})},e.trapFocusPopupElements=function(t,n){void 0===n&&(n=null);var r=!1;window.addEventListener("keydown",function(t){e.keys.isLeftShift(t)&&(r=!0)}),window.addEventListener("keyup",function(t){e.keys.isLeftShift(t)&&(r=!1)});var o=t[0],i=t[t.length-1];document.activeElement&&n.contains(document.activeElement)||o.focus(),t.forEach(function(n,a){n.addEventListener("keydown",function(n){e.keys.isTab(n)&&(n.preventDefault(),r?(t[a-1]?t[a-1]:i).focus():(t[a+1]?t[a+1]:o).focus())})})},e.trapFocusBetween=function(e){function t(e,t,r){if(9===r.keyCode)return n?t&&t.focus():e&&e.focus(),r.preventDefault();16===r.keyCode&&(n=!0)}for(var n=!1,r=[],o=0;o=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth),i=0===r.width||0===r.height;return(e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0)&&(!t.shouldBeInViewport||o)&&!i&&"0"!==n.opacity&&"hidden"!==n.visibility&&"collapse"!==n.visibility},r=n(e,t);if(!t.skipParentCheck)for(;r&&e.parentNode&&e.parentNode!==document;)n(e.parentNode,{shouldBeInViewport:!1})?e=e.parentNode:r=!1;return r},e.fireEvent=function(e,t){if(e.fireEvent)e.fireEvent("on"+t);else{var n=document.createEvent("Events");n.initEvent(t,!0,!1),e.dispatchEvent(n)}},e.clickOnEnter=function(t){t&&"function"==typeof t.click&&!e.isElementEditable(t)&&t.addEventListener("keydown",function(n){e.keys.isEnter(n)&&(n.preventDefault(),t.click())})},e.clickOnSpace=function(t){t&&"function"==typeof t.click&&!e.isElementEditable(t)&&t.addEventListener("keydown",function(n){e.keys.isSpace(n)&&(n.preventDefault(),t.click())})},e.execOnPage=function(e,t){var n,r,o;if(Array.isArray(e))try{for(var i=__values(e),a=i.next();!a.done;a=i.next()){var l=a.value;if(o=new RegExp(l).test(window.location.href)){t();break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}else(o=new RegExp(e).test(window.location.href))&&t();return o},e.getFocusableElement=function(t,n,r){t=t||"next",r=r||{},r.childrenOnly=r.childrenOnly||!1,r.canBeHidden=r.canBeHidden||!1;var o=Array.from((r.childrenOnly?n:document).querySelectorAll(e.focusableElementsSelector+(n?","+e.getCssPath(n):"")));r.canBeHidden||(o=o.filter(function(e){return!!e.offsetParent}));var i=o.findIndex(function(e){return!(!n||e!==n)||e===document.activeElement});return"next"===t?o[i+1]||o[0]:"prev"===t?o[i-1]||o[o.length-1]:void 0},e.getCssPath=function(e){for(var t=[];e.parentNode;){if(e.id){t.unshift("#"+e.id);break}if(e==e.ownerDocument.documentElement)t.unshift(e.tagName);else{for(var n=1,r=e;r.previousElementSibling;r=r.previousElementSibling,n++);t.unshift(e.tagName+":nth-child("+n+")")}e=e.parentNode}return t.join(" > ")},e.getElementPosition=function(e){for(var t=0,n=0;e;){if("BODY"==e.tagName){var r=e.scrollLeft||document.documentElement.scrollLeft,o=e.scrollTop||document.documentElement.scrollTop;t+=e.offsetLeft-r+e.clientLeft,n+=e.offsetTop-o+e.clientTop}else t+=e.offsetLeft-e.scrollLeft+e.clientLeft,n+=e.offsetTop-e.scrollTop+e.clientTop;e=e.offsetParent}return{x:t,y:n}};var n=[];e.onHistoryPushState=function(e,t){if(void 0===t&&(t={}),t=__assign({delay:300},t),n.push(e),1===n.length){if(window.history){var r=window.history.pushState;window.history.pushState=function(e){return"function"==typeof window.history.onpushstate&&window.history.onpushstate({state:e}),r.apply(window.history,arguments)}}var o;window.onpopstate=window.history.onpushstate=function(){clearTimeout(o),o=setTimeout(function(){return n.forEach(function(e){return e()})},t.delay)}}},e.announce=function(e){var t=document.createElement("div");t.setAttribute("aria-live","assertive"),t.style.width="0",t.style.height="0",t.style.overflow="hidden",document.body.insertAdjacentElement("afterbegin",t),setTimeout(function(){t.innerHTML=e},1e3),setTimeout(function(){t.remove()},1e4)},e.queryXPath=function(e,t){var n;void 0===t&&(t=null);var r=document.evaluate(e,t||document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null);return(null===r||void 0===r?void 0:r.singleNodeValue)&&(null===(n=null===r||void 0===r?void 0:r.singleNodeValue)||void 0===n?void 0:n.nodeType)===Node.ELEMENT_NODE?r.singleNodeValue:null},e.queryXPathAll=function(e,t){void 0===t&&(t=null);for(var n=document.evaluate(e,t||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),r=[],o=0,i=n.snapshotLength;o=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function e(e){var n=e.alt;if(n&&n.trim())return n.trim();var r=e.getAttribute("aria-label");if(r&&r.trim())return r.trim();var o=e.getAttribute("aria-describedby");if(o){var i=t(o);if(i)return i}var a=e.getAttribute("aria-labelledby");if(a){var i=t(a);if(i)return i}return null}function t(e){var t=e.split(" "),n="";return t.forEach(function(e){e=e.trim();var t=document.getElementById(e);n+=t&&t.textContent?t.textContent:""}),n}var n,r=UserWayWidgetApp.addLib("remediation_utils");r.ignoreElementFromHelperProcessingAttr="data-uw-rm-ignore";var o=UserWayWidgetApp.getLib("util"),i=UserWayWidgetApp.getLib("inlineStyling"),a=UserWayWidgetApp.getLib("xpath_search"),l=UserWayWidgetApp.getLib("remediation_util");r.PROCESS_ATTRIBUTES={CER:{popup:{wrapper:"data-uw-cer-popup-wrapper",close:"data-uw-cer-popup-close"}}};var u={attrMarker:"uw-remediation",className:"uw-remediation-highlighting",styles:(n={border:"dashed 2px #c00"},n["border-radius"]="3px",n["box-shadow"]="0 0 0 4px yellow, inset 0 0 0 4px yellow",n)};r.sendBackEnd=function(e,t,n){var r={method:"POST",url:"https://api.userway.org/api"+e,header:{"Content-Type":"application/json"},body:{userId:UserWayWidgetApp.ContextHolder.config.services.userId,siteId:UserWayWidgetApp.ContextHolder.config.services.siteId}};return t&&(r.body.elements=t),"object"==typeof n&&Object.keys(n).map(function(e){r.body[e]=n[e]}),o.request(r)},r.highlightElements=function(e,t,n){var r,o,l,d,s=document.querySelectorAll("."+u.className);s.length&&s.forEach(function(e){i.resetInlineStyles(e,u.attrMarker,u.styles),e.classList.remove(u.className)});var c=[];switch(e){case"xpath":var f=a.recursiveXpathSearch(t);c="boolean"!=typeof f?[f]:[];break;case"href":var p=Array.prototype.slice.call(document.querySelectorAll("[href]"));try{for(var m=__values(p),y=m.next();!y.done;y=m.next()){var h=y.value;h.href.toLowerCase().indexOf(t)>-1&&c.push(h)}}catch(e){r={error:e}}finally{try{y&&!y.done&&(o=m.return)&&o.call(m)}finally{if(r)throw r.error}}break;case"src":var g=Array.prototype.slice.call(document.querySelectorAll("[src]"));try{for(var v=__values(g),b=v.next();!b.done;b=v.next()){var _=b.value;_.src.toLowerCase().indexOf(t)>-1&&c.push(_)}}catch(e){l={error:e}}finally{try{b&&!b.done&&(d=v.return)&&d.call(v)}finally{if(l)throw l.error}}break;case"attr":if(n.attrName){var E=document.querySelectorAll("["+n.attrName+'="'+t+'"]');c=Array.prototype.slice.call(E)}}for(var w=0;w=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(){function e(e){var t,n,r=[].slice.call(m.findAllElements(e)),o=r.filter(function(e){var t,n,r=Array.from(e.attributes),o=!1;try{for(var i=__values(r),a=i.next();!a.done;a=i.next()){var l=a.value,u=l.value.toLowerCase();if(-1!==u.indexOf("close")||-1!==u.indexOf("dismiss")){o=!0;break}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o}),i=null,a=u().vw,l=Math.round(a/20);try{for(var d=__values(o),s=d.next();!s.done;s=d.next()){var c=s.value,f=c.offsetWidth,p=c.offsetHeight;if(f&&p&&f<=5*l){i=c;break}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=d.return)&&n.call(d)}finally{if(t)throw t.error}}return i}function t(e,t){var n,r,o=null;try{for(var i=__values(e[0]),a=i.next();!a.done;a=i.next()){var u=a.value,d=new Array(e.length).fill(0);d[0]=1;for(var s=1;s-1&&(d[s]=1)}if(d.every(function(e){return!!e})){o=u;break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o&&0===e[0].indexOf(o)&&l(o.offsetWidth,t)<5&&(o=null),o}function n(e,t){return e.classList.contains("tt-dropdown-menu")||/datepicker/.test(e.getAttribute("class"))||!!e.id&&"klevuSearchingArea"===e.id||e.hasAttribute("data-uw-rm-ignore")||!!Array.from(document.querySelectorAll("nav")).find(function(t){return e.contains(t)})||!!e.querySelector("[class*='search']")}function r(e){var t=window.getComputedStyle(e),r="none"===t.display,o="fixed"===t.position,i=parseFloat(t.width),a=parseFloat(t.height),u=l(i,document.body.offsetWidth),d=l(a,document.body.offsetHeight);return u>=10&&d>=10&&o&&!r&&i&&a&&!n(e,t)}function o(e){var t=null;if(!e)return t;for(;e&&"BODY"!==e.tagName;){if(r(e)){t=e;break}e=e.parentElement}return t}function i(){return/^([^.]+\.)?manage\..*userway\.(dev|org)$/.test(window.location.host)}function a(){if(114355===f.services.siteId||990479===f.services.siteId||i())return null;var e=u(),n=e.vw,r=e.vh,a=Math.round(n/2),l=Math.round(r/2),d=Math.round(3*n/4),s=Math.round(r/4),c=l+Math.round(r/4),p=Math.round(n/20),m=Math.round(r/20),y=[{x:a,y:l-m},{x:a+p,y:l},{x:a,y:l+m},{x:a-p,y:l}],h=[{x:d,y:l-m},{x:d+p,y:l},{x:d,y:l+m},{x:d-p,y:l}],g=[{x:a,y:s},{x:a-p,y:s+m},{x:a+p,y:s+m}],v=[{x:a,y:c},{x:a-p,y:c-m},{x:a+p,y:c-m}],b=document.elementsFromPoint(y[0].x,y[0].y),_=document.elementsFromPoint(y[1].x,y[1].y),E=document.elementsFromPoint(y[2].x,y[2].y),w=document.elementsFromPoint(y[3].x,y[3].y),A=o(t([b,_,E,w],n));if(A)return A;var S=document.elementsFromPoint(g[0].x,g[0].y),k=document.elementsFromPoint(g[1].x,g[1].y),x=document.elementsFromPoint(g[2].x,g[2].y),W=o(t([S,k,x],n));if(W)return W;var O=document.elementsFromPoint(v[0].x,v[0].y),C=document.elementsFromPoint(v[1].x,v[1].y),P=document.elementsFromPoint(v[2].x,v[2].y),N=o(t([O,C,P],n));if(N)return N;var L=document.elementsFromPoint(h[0].x,h[0].y),H=document.elementsFromPoint(h[1].x,h[1].y),U=document.elementsFromPoint(h[2].x,h[2].y),R=document.elementsFromPoint(h[3].x,h[3].y),T=o(t([L,H,U,R],n));return T||null}function l(e,t){return Math.abs(e-t)/((e+t)/2)*100}function u(){return{vw:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),vh:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}var d=UserWayWidgetApp.addLib("cer_observer"),s=UserWayWidgetApp.getLib("event_emitter"),c=UserWayWidgetApp.getLib("remediation_utils"),f=UserWayWidgetApp.ContextHolder.config,p=UserWayWidgetApp.getLib("remediationConfig").popups,m=UserWayWidgetApp.getLib("util"),y=[];d.tick=function(t){var n=t.processParameters;n.debugMode&&console.log("CER observer: tick");var r,o=null;if(n.debugMode&&(r=performance.now()),p.enabled&&!f.tunings.new_popup_helper){var i=null;try{i=a()}catch(e){n.debugMode&&console.error(e)}if(i){i.setAttribute(c.PROCESS_ATTRIBUTES.CER.popup.wrapper,"");if(-1===y.indexOf(i)){s.emitEvent("UW_CER_POPUP_FOUND",[i]),y.push(i);var l=null;try{l=e(i)}catch(e){n.debugMode&&console.error(e)}l&&l.setAttribute(c.PROCESS_ATTRIBUTES.CER.popup.close,""),s.emitEvent("UW_CER_POPUP_ON",[[i,l]]),n.debugMode&&console.log("CER observer: POPUP found",i,l)}}else y.forEach(function(e){s.emitEvent("UW_CER_POPUP_OFF",[e]),n.debugMode&&console.log("CER observer: POPUP closed",e)}),y=[]}n.debugMode&&(o=performance.now(),console.log("CER observer tick: execution took "+(o-r)+" milliseconds."))}}();var __read=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},__spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o-1)return!0;if(!x.commonSettings)return!1;var e=x.commonSettings,t=e.enabled,n=e.config,r=n.mobile,o=n.disabledPages;return!t||(!(!UserWayWidgetApp.ContextHolder.config.isMobile||!r||r.enabled)||!(null===o||void 0===o||!o.some(function(e){var t;return(null===(t=window.location)||void 0===t?void 0:t.href.indexOf(e))>-1})))},M=!!W.remediation&&!D(),F=function(e){return T?null:e},q=function(e){var t,n,r,o=!(null===(r=null===(n=null===(t=UserWayWidgetApp.ContextHolder)||void 0===t?void 0:t.config)||void 0===n?void 0:n.tunings)||void 0===r?void 0:r.new_keyboard_nav);return e&&o?e:null},j=!1;try{UserWayWidgetApp.setDebugMode=function(e){e?(window.localStorage.setItem("userway-rm-debug","1"),console.log("UserWay Remediation: Debug mode enabled")):window.localStorage.removeItem("userway-rm-debug")},j=window.localStorage.getItem("userway-rm-debug")}catch(e){}var B={iterationInProgress:!1,locationChanged:!0,domChangesEnqueued:[],completedEventFired:!1,debugMode:j},V=M?[q(F("REMEDIATION_KEYBOARD_NAVIGATION"))].filter(Boolean):[],Y=[],Q=[],X=M?["REMEDIATION_FOCUS_STYLE","REMEDIATION_POPUP"]:[],K=[].concat(V,Y,Q),G=function(){function n(){}return n.prototype.onHelperRemediationStarted=function(t){e(t)},n.prototype.onHelperRemediationCompleted=function(e){e.backEndData&&e.backEndData.items.length&&E.sendBackEnd("/remediation/"+e.backEndData.path,e.backEndData.items,e.backEndData.props),C.put(e),p(e.helperName,C.getHelperPostMessagePayload(e.helperName)),t(e.helperName)},n}();v.HelperCallbackAggregator=new G,(!U||function(){return R.hasAttribute("data-uw-w-kb")}()||UserWayWidgetApp.ContextHolder.config.isMobile)&&l();var J={"get-site-info":f,"remediation-count":s,"all-data":c,"element-is-visible":function(e){var t=JSON.parse(e.data.data),n=t.elements.map(function(e){return[e,E.isElementVisible(e)]});p("element-is-visible",{key:t.key,elements:n})},"element-highlight":function(e){var t=e.data.data.type,n=e.data.data.value?e.data.data.value.toLowerCase():"",r=Object.assign({scroll:!0},e.data.data.options||{});E.highlightElements(t,n,r)},"app-key-nav-enabled":function(e){d(e)},remediation:function(e){var t=e.data.type;C.get()[t]&&p(t,C.getHelperPostMessagePayload(t))},"remediation-check":function(){i()},"add-dynamically":u},Z=Object.assign({},J),z=UserWayWidgetApp.getLib("REMEDIATION_FOCUS_STYLE");Z["custom-focus-get"]=function(){O.waitUntil(function(){return"function"==typeof(null===z||void 0===z?void 0:z.getFocusStyle)},function(){p("custom-focus-get",z.getFocusStyle())})},Z["custom-focus-update"]=function(e){e.data&&e.data.data&&O.waitUntil(function(){return"function"==typeof(null===z||void 0===z?void 0:z.updateOutlineStyle)},function(){z.updateOutlineStyle(e.data)})};var $=function(t){var n=t.data||{};if(n.isUserWay&&("remediation"===n.action||"aria-editor"===n.action)){var r=t.data.type;if(-1!==Object.keys(Z).indexOf(r)){e(r);(0,Z[r])(t),e(r)}else Z.remediation(t)}};w.registerPostMessageListener($)}();